package com.kongxx.struts2study.host.web.action;

import com.kongxx.struts2study.common.web.action.BaseAction;
import com.kongxx.struts2study.host.model.Host;
import com.kongxx.struts2study.host.service.HostService;

public class HostDeleteAction extends BaseAction {
	
	private static final long serialVersionUID = 1L;
	
	private Host host;
	
	private HostService hostService;
	
	@Override
	public String execute() {
		hostService.delete(host = hostService.find(host.getId()));
		return SUCCESS;
	}

	public Host getHost() {
		return host;
	}

	public void setHost(Host host) {
		this.host = host;
	}

	public HostService getHostService() {
		return hostService;
	}

	public void setHostService(HostService hostService) {
		this.hostService = hostService;
	}
}
